﻿/*
 * 程序描述
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ServerMonitor.Models
{
    public class ProcessDescribe
    {
        /// <summary>
        /// 0可选监控，1必要监控
        /// </summary>
        public int ProcessLavel { get; set; }
        /// <summary>
        /// 备注名称
        /// </summary>
        public string Memo { get; set; }
        /// <summary>
        /// 进程名称
        /// </summary>
        public string ProcessName { get; set; }
        /// <summary>
        /// 进程启动时间
        /// </summary> 
        public DateTime? StartTime { get; set; }
        /// <summary>
        /// 进程主窗口名称
        /// </summary>
       // public string MainWindowTitle { get; set; }
        /// <summary>
        /// 程序是否相应
        /// </summary>
        public string Responding { get; set; }

        /// <summary>
        /// 程序路径
        /// </summary>
        public string ProcessPath { get; set; }

        /// <summary>
        /// 运行时长
        /// </summary>
        public string TotalTime { get; set; }

        /// <summary>
        /// 监控状态
        /// </summary>
        public bool Monitor { get; set; }


    }



    public class GlobalSetting  
    {

        public GlobalSetting() 
        {
            DbNames = "";//监控的数据库名称
            ConStr = "";//数据库链接字符串
            Ips = "";//监控服务器的Ip
            ConnectCount = 0;//最大连接数
            DownKbs = 0;//下载速度
            UpKbs = 0;//上传速度
            PhoneNumbers = string.Empty;
            Interval = 5;//报警间隔默认5分钟
            Count = 5;//报警次数默认
            CpuAlarm = 100;//CPU报警默认
            DiskAlarm = 100;//磁盘报警默认
            MemoryAlarm = 100;//内存报警默认
            SysAlarm = false;
            OpenId = string.Empty;//OpenId
            Pds = new List<ProcessDescribe>(); 
        }

        /// <summary>
        /// 下行速度
        /// </summary>
        public int DownKbs { get; set; }

        /// <summary>
        /// 上行速度
        /// </summary>
        public int UpKbs { get; set; }

        /// <summary>
        /// 数据库连接数
        /// </summary>
        public int ConnectCount { get; set; }

        /// <summary>
        /// 数据库名称
        /// </summary>
        public string DbNames { get; set; }
         
        /// <summary>
        /// 数据库链接串
        /// </summary>
        public string ConStr { get; set; }
         
        /// <summary>
        /// 服务器IP
        /// </summary>
        public string Ips { get; set; } 

        /// <summary>
        /// 接收报警信息的手机号
        /// </summary>
        public string PhoneNumbers { get; set; }

        /// <summary>
        /// 报警时间间隔
        /// </summary>
        public int Interval { get; set; }

        /// <summary>
        /// 报警次数
        /// </summary>
        public int Count { get; set; }

        /// <summary>
        /// CPU报警阀值
        /// </summary>
        public int CpuAlarm { get; set; }

        /// <summary>
        /// 磁盘报警阀值
        /// </summary>
        public int DiskAlarm { get; set; }


        /// <summary>
        /// 内存报警阀值
        /// </summary>
        public int MemoryAlarm { get; set; }

        /// <summary>
        /// 监控的进程集合
        /// </summary>
        public List<ProcessDescribe> Pds { get; set; }

        /// <summary>
        /// 是否报警
        /// </summary>
        public bool SysAlarm { get; set; }

        public string OpenId { get; set; }
    }
}
